package finbudget.client.ui.table.fields;

import finbudget.client.ui.table.Transformator;

public class DescriptionField extends StringField {
	private static final long serialVersionUID = 4714150689678458949L;

	private String height;
	private int maxCharacters;
	private boolean formattingForbidden;

	/** serialization requirements */
	protected DescriptionField() {
		super();
		type = Type.DESCRIPTIONINPLACE;
	}

	public DescriptionField(String id, String name, int row, int col) {
		super(id, name, row, col);
		type = Type.DESCRIPTIONINPLACE;
	}

	public String getHeight() {
		return height;
	}

	public DescriptionField setHeight(String height) {
		this.height = height;
		return this;
	}

	public int getMaxCharacters() {
		return maxCharacters;
	}

	public DescriptionField setMaxCharacters(int maxCharacters) {
		this.maxCharacters = maxCharacters;
		return this;
	}

	public boolean isFormattingForbidden() {
		return formattingForbidden;
	}

	public DescriptionField setFormattingForbidden(boolean formattingForbidden) {
		this.formattingForbidden = formattingForbidden;
		return this;
	}

	@Override
	public Object toRaw(Transformator transformator, Object value) {
		return transformator.toRaw(this, value);
	}

	@Override
	public String fromRaw(Transformator transformator, Object value) {
		return transformator.fromRaw(this, value);
	}

}
